package com.example.teacher.Service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.common.domain.pojo.HomeworkQuestion;
import com.example.teacher.Service.HomeworkQuestionService;
import com.example.teacher.mapper.HomeworkQuestionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeworkQuestionImpl extends ServiceImpl<HomeworkQuestionMapper, HomeworkQuestion> implements HomeworkQuestionService {
    @Autowired
    private HomeworkQuestionMapper homeworkQuestionMapper;

    @Override
    public List<HomeworkQuestion> getByHomeworkId(String homeworkId) {
        LambdaQueryWrapper<HomeworkQuestion> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(HomeworkQuestion::getHomeworkId, homeworkId);
        return homeworkQuestionMapper.selectList(queryWrapper);
    }
}
